package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-08-05
 * Time: 10:12
 */
@Controller
@ResponseBody
public class TestController {
    @RequestMapping("/hi")
    public String hi(){
        return "hello.html";
    }
    @RequestMapping("/json")
    public HashMap<String, String> met1hod_8() {
        HashMap<String, String> map = new HashMap<>();
        map.put("Java", "Java Value");
        map.put("Oracle", "MySQL Value");
        map.put("Spring", "Spring Value");
        return map;
    }
    @RequestMapping("v")
    public String sayhi(){
        return "hello world";
    }
}
